3.829 \(\int \sqrt{-1+x} x^2 \sqrt{1+x} \, dx\)

Optimal. Leaf size=45 \[ \frac{1}{4} (x-1)^{3/2} x (x+1)^{3/2}+\frac{1}{8} \sqrt{x-1} x \sqrt{x+1}-\frac{1}{8} \cosh ^{-1}(x) \]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x])/8 + ((-1 + x)^(3/2)*x*(1 + x)^(3/2))/4 - ArcCosh[x]
/8

_______________________________________________________________________________________

Rubi [A]  time = 0.0394341, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ \frac{1}{4} (x-1)^{3/2} x (x+1)^{3/2}+\frac{1}{8} \sqrt{x-1} x \sqrt{x+1}-\frac{1}{8} \cosh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[-1 + x]*x^2*Sqrt[1 + x],x]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x])/8 + ((-1 + x)^(3/2)*x*(1 + x)^(3/2))/4 - ArcCosh[x]
/8

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 4.25105, size = 37, normalized size = 0.82 \[ \frac{x \left (x - 1\right )^{\frac{3}{2}} \left (x + 1\right )^{\frac{3}{2}}}{4} + \frac{x \sqrt{x - 1} \sqrt{x + 1}}{8} - \frac{\operatorname{acosh}{\left (x \right )}}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(-1+x)**(1/2)*(1+x)**(1/2),x)

[Out]

x*(x - 1)**(3/2)*(x + 1)**(3/2)/4 + x*sqrt(x - 1)*sqrt(x + 1)/8 - acosh(x)/8

_______________________________________________________________________________________

Mathematica [A]  time = 0.035504, size = 44, normalized size = 0.98 \[ \frac{1}{8} \left (\sqrt{x-1} x \sqrt{x+1} \left (2 x^2-1\right )-2 \sinh ^{-1}\left (\frac{\sqrt{x-1}}{\sqrt{2}}\right )\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[-1 + x]*x^2*Sqrt[1 + x],x]

[Out]

(Sqrt[-1 + x]*x*Sqrt[1 + x]*(-1 + 2*x^2) - 2*ArcSinh[Sqrt[-1 + x]/Sqrt[2]])/8

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 52, normalized size = 1.2 \[ -{\frac{1}{8}\sqrt{-1+x}\sqrt{1+x} \left ( -2\,{x}^{3}\sqrt{{x}^{2}-1}+x\sqrt{{x}^{2}-1}+\ln \left ( x+\sqrt{{x}^{2}-1} \right ) \right ){\frac{1}{\sqrt{{x}^{2}-1}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(-1+x)^(1/2)*(1+x)^(1/2),x)

[Out]

-1/8*(-1+x)^(1/2)*(1+x)^(1/2)*(-2*x^3*(x^2-1)^(1/2)+x*(x^2-1)^(1/2)+ln(x+(x^2-1)
^(1/2)))/(x^2-1)^(1/2)

_______________________________________________________________________________________

Maxima [A]  time = 1.3487, size = 50, normalized size = 1.11 \[ \frac{1}{4} \,{\left (x^{2} - 1\right )}^{\frac{3}{2}} x + \frac{1}{8} \, \sqrt{x^{2} - 1} x - \frac{1}{8} \, \log \left (2 \, x + 2 \, \sqrt{x^{2} - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(x + 1)*sqrt(x - 1)*x^2,x, algorithm="maxima")

[Out]

1/4*(x^2 - 1)^(3/2)*x + 1/8*sqrt(x^2 - 1)*x - 1/8*log(2*x + 2*sqrt(x^2 - 1))

_______________________________________________________________________________________

Fricas [A]  time = 0.225318, size = 189, normalized size = 4.2 \[ -\frac{16 \, x^{8} - 32 \, x^{6} + 20 \, x^{4} -{\left (16 \, x^{7} - 24 \, x^{5} + 10 \, x^{3} - x\right )} \sqrt{x + 1} \sqrt{x - 1} - 4 \, x^{2} -{\left (8 \, x^{4} - 4 \,{\left (2 \, x^{3} - x\right )} \sqrt{x + 1} \sqrt{x - 1} - 8 \, x^{2} + 1\right )} \log \left (\sqrt{x + 1} \sqrt{x - 1} - x\right )}{8 \,{\left (8 \, x^{4} - 4 \,{\left (2 \, x^{3} - x\right )} \sqrt{x + 1} \sqrt{x - 1} - 8 \, x^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(x + 1)*sqrt(x - 1)*x^2,x, algorithm="fricas")

[Out]

-1/8*(16*x^8 - 32*x^6 + 20*x^4 - (16*x^7 - 24*x^5 + 10*x^3 - x)*sqrt(x + 1)*sqrt
(x - 1) - 4*x^2 - (8*x^4 - 4*(2*x^3 - x)*sqrt(x + 1)*sqrt(x - 1) - 8*x^2 + 1)*lo
g(sqrt(x + 1)*sqrt(x - 1) - x))/(8*x^4 - 4*(2*x^3 - x)*sqrt(x + 1)*sqrt(x - 1) -
 8*x^2 + 1)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int x^{2} \sqrt{x - 1} \sqrt{x + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(-1+x)**(1/2)*(1+x)**(1/2),x)

[Out]

Integral(x**2*sqrt(x - 1)*sqrt(x + 1), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.241598, size = 62, normalized size = 1.38 \[ \frac{1}{8} \,{\left ({\left (2 \,{\left (x + 1\right )}{\left (x - 2\right )} + 5\right )}{\left (x + 1\right )} - 1\right )} \sqrt{x + 1} \sqrt{x - 1} + \frac{1}{4} \,{\rm ln}\left ({\left | -\sqrt{x + 1} + \sqrt{x - 1} \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(x + 1)*sqrt(x - 1)*x^2,x, algorithm="giac")

[Out]

1/8*((2*(x + 1)*(x - 2) + 5)*(x + 1) - 1)*sqrt(x + 1)*sqrt(x - 1) + 1/4*ln(abs(-
sqrt(x + 1) + sqrt(x - 1)))